<%@ page import="java.time.LocalTime" %><%--
  Created by IntelliJ IDEA.
  User: 17126
  Date: 2022/3/16
  Time: 10:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>动作标识</title>
</head>
<body>

<% LocalTime time = LocalTime.now();
    int hour = time.getHour();%>

<% if (hour < 10) {%>
<jsp:forward page="morning.jsp"></jsp:forward>
<%}%>

<% if (hour > 18) {%>
<jsp:forward page="evening.jsp"></jsp:forward>
<%}%>

<p>现在时间区间为:<%= hour%>点,你好!</p>

</body>
</html>
